package com.mt.roll.wms.params;


import com.mt.roll.core.base.BaseParam;
import com.mt.roll.core.validator.groups.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * @Author wangxitao
 * @Date 2021/1/7 19:34
 * @Version 1.0
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "员工参数对象", description = "用于新增和更新员工信息")
public class WorkerParam extends BaseParam {
    private static final long serialVersionUID = 1L;
    /**
     * 主键，自增
     */
    @ApiModelProperty(value = "主键，更新时需要填写", example = "1")
    @NotNull(message = "员工ID不能为空", groups = {UpdateGroup.class})
    private Long id;

    /**
     * 员工编码
     */
    @ApiModelProperty(value = "员工编码", required = true, example = "员工编码")
    @NotBlank(message = "员工编码不能为空")
    private String code;

    /**
     * 员工名称
     */
    @ApiModelProperty(value = "员工名称", required = true, example = "员工名称")
    @NotBlank(message = "员工名称不能为空")
    private String name;

    /**
     * 性别:0 、男，1、女
     */
    @ApiModelProperty(value = "性别", required = true, example = "性别")
    private Integer sex;
    /**
     * 入职时间
     */
    @ApiModelProperty(value = "入职时间", required = true, example = "入职时间")
    private LocalDateTime entryTime;
    /**
     * 电话
     */
    @ApiModelProperty(value = "电话", required = true, example = "电话")
    private String telephone;
    /**
     * 微信号
     */
    @ApiModelProperty(value = "微信号", required = true, example = "微信号")
    private String wechatCode;
    /**
     * 邮箱
     */
    @ApiModelProperty(value = "邮箱", required = true, example = "邮箱")
    private String email;
    /**
     * 专业ID
     */
    @ApiModelProperty(value = "专业ID", required = true, example = "专业ID")
    private long [] majorId;
    /**
     * 所属车间
     */
    @ApiModelProperty(value = "所属车间", required = true, example = "所属车间")
    private String workshop;
    /**
     * 是否在岗:0 、在岗，1、不在岗
     */
    @ApiModelProperty(value = "是否在岗", required = true, example = "是否在岗")
    private Integer onDuty;

    /**
     * 员工描述
     */
    @ApiModelProperty(value = "员工描述", required = true, example = "员工描述")
    private String description;

    /**
     * 角色ID
     */
    @ApiModelProperty(value = "角色ID", required = true, example = "角色ID")
    private long roleId;
}
